package com.jason.session;

import com.jason.config.BoundSql;
import com.jason.config.MapperStatement;

import java.beans.IntrospectionException;
import java.lang.reflect.InvocationTargetException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;

public interface StatementHandler {

    PreparedStatement parameterHand(Connection connection, MapperStatement mapperStatement, BoundSql boundSql, Object ... params)
            throws SQLException, IllegalAccessException, NoSuchFieldException;

    <E> List<E> resultHand(ResultSet resultSet, MapperStatement mapperStatement)
            throws SQLException, IllegalAccessException, InstantiationException, IntrospectionException, InvocationTargetException;
}
